<?php 
	error_reporting(E_ALL);
	session_start();
	require_once('constants.php');
	include('libs/functions.php.php');
	include('classes/userClass.php');


	
	$userObj = new userClass();
	$_SESSION= array();
	if(isset($_POST['email'])){	
				
		$rows= $userObj->log_in($_POST['email'],$_POST['password']);
		if(count($rows)>0){
			$_SESSION['session_user'] = $rows[0]['session_user'];
			
		}
		echo json_encode($rows);
	}	

	

?>